<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="jquery-3.2.0.js" type="text/javascript"></script>
		<style type="text/css">
			img {
				vertical-align: middle;
			}
		</style>
		<script type="text/javascript">
			$(function() {
				$('#all').on('click', function() {
					if (this.checked) {
						$("input[name='product']").attr('checked', true);
					} else {
						$("input[name='product']").attr('checked', false);
					}
				});
			});
		</script>
	</head>
	<body>
		

		<div id="d5">
			<input type="checkbox" id="all" />全选
		</div>
		<div id="d1">
			<input type="checkbox" name="product" />
			<img src="image/list0.jpg">
		</div>
		<div id="d2">
			<input type="checkbox" name="product" />
			<img src="image/list0.jpg">
		</div>
		<div id="d3">
			<input type="checkbox" name="product" />
			<img src="image/list0.jpg">
		</div>
		<div id="d4">
			<input type="checkbox" name="product" />
			<img src="image/list0.jpg">
		</div>
	</body>
</html>
